<?php
/* SVN FILE: $Id: adminSettings.php 229 2009-09-25 23:07:14Z supersmashbrothers $ */
/**
* ibMarket 2
* IP.Board 3.0
* ibMarket Plugin Settings Template
*
* @author $Author: supersmashbrothers $
* @copyright $Copyright$
* @version $Revision: 229 $
* @lastrevision $Date: 2009-09-25 23:07:14 +0000 (Fri, 25 Sep 2009) $
* @modifiedby $LastChangedBy: supersmashbrothers $
* @lastmodified $LastChangedDate: 2009-09-25 23:07:14 +0000 (Fri, 25 Sep 2009) $
* @filesource $URL: http://ipb-ibmarket.googlecode.com/svn/ibmarket2/trunk/admin/applications_addon/other/ibmarket/sources/plugin/adminSettings.php $
*/

abstract class admin_settings
{
	/**#@+
	 * Registry Object Shortcuts
	 *
	 * @access	protected
	 * @var		object
	 */
	protected $registry;
	protected $DB;
	protected $settings;
	protected $request;
	protected $lang;
	protected $member;
	protected $memberData;
	protected $cache;
	protected $caches;
	/**#@-*/
	
	/**
	 * Constructor to setup the item
	 *
	 * @access	public
	 * @param	ipsRegistry	$registry	IPB registry
	 */
	public final function __construct(ipsRegistry $registry)
	{
		/* Make registry objects */
		$this->registry   =  $registry;
		$this->DB         =  $this->registry->DB();
		$this->settings   =& $this->registry->fetchSettings();
		$this->request    =& $this->registry->fetchRequest();
		$this->lang       =  $this->registry->getClass('class_localization');
		$this->member     =  $this->registry->member();
		$this->memberData =& $this->registry->member()->fetchMemberData();
		$this->cache      =  $this->registry->cache();
		$this->caches     =& $this->registry->cache()->fetchCaches();
	}
	
	/**
	 * The settings form a person see
	 *
	 * @access	public
	 * @return	string	The settings HTML
	 */
	public abstract function settingsForm(array $pluginInfo);
	
	/**
	 * Saving the settings to a plugin
	 *
	 * @access	public
	 * @return	void
	 */
	public abstract function settingsSave(array &$pluginInfo);
}